{template 'common/header-gw'}
<ol class="breadcrumb">
	<li><a href="./?refresh"><i class="fa fa-home"></i></a></li>
	<li class=""><a href="{url 'user/display'}">用户管理</a></li>
	<li class="active">查看用户权限</li>
</ol>
<ul class="nav nav-tabs">
	<li><a href="{php echo url('user/display');}">用户列表</a></li>
	<li><a href="{php echo url('user/create');}">添加用户</a></li>
	<li><a href="{url 'user/edit' array('uid' => $uid)}">编辑用户</a></li>
	<li class="active"><a href="{php echo url('user/permission', array('uid' => $uid));}">查看用户权限</a></li>
</ul>

<div class="clearfix">
	<div class="form form-horizontal" >
		<h5 class="page-header">用户组基本权限</h5>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">用户组名</label>
			<div class="col-sm-9">
				<p class="form-control-static">{$group['name']}&nbsp;&nbsp;<a href="{php echo url('user/group/post', array('id' => $group['id']));}" title="编辑当前用户所在用户组"><i class="fa fa-edit"></i></a></p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">最多公众号数量</label>
			<div class="col-sm-9">
				<p class="form-control-static">{$group['maxaccount']}</p>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">最多子公众号数量</label>
			<div class="col-sm-9">
				<p class="form-control-static">{$group['maxsubaccount']}</p>
			</div>
		</div>
		
		<h5 class="page-header">可使用公众号</h5>
		<div class="panel panel-default">
		<div class="panel-body table-responsive">
		<table class="tb table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:30px;" class="row-first">&nbsp;</th>
					<th>公众号</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{loop $wechats $item}
				<tr>
					<td class="row-first"></td>
					<td>{$item['name']}</td>
					<td><a href="{url 'account/post' array('uniacid' => $item['uniacid'])}">编辑</a></td>
				</tr>
				{/loop}
			</tbody>
		</table>
		</div>
		</div>
		
		<h5 class="page-header">当前用户所在用户组可使用的公众号权限</h5>
		<div class="panel panel-default">
		<div class="panel-body table-responsive">
		<table class="tb table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:40px;" class="row-first">&nbsp;</th>
					<th style="min-width:100px;">公众服务套餐</th>
					<th style="min-width:100px;">模块权限</th>
					<th style="width:350px;">模板权限</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{loop $group['package'] $item}
				<tr>
					<td class="row-first"></td>
					<td style="line-height:30px;">{$item['name']}</td>
					<td style="line-height:30px;">
						<span class="label label-success">系统模块</span>
						{loop $item['modules'] $module}
						<span class="label label-info">{$module['title']}</span>
						{/loop}
					</td>
					<td style="line-height:30px;">
						<span class="label label-success">微站默认模板</span>
						{loop $item['templates'] $template}
						<span class="label label-info">{$template['title']}</span>
						{/loop}
					</td>
					<td></td>
				</tr>
				{/loop}
			</tbody>
		</table>
		</div>
		</div>
		<div class="form-group">
			<div class="col-xs-12 col-sm-10 col-md-10 col-lg-10">
				<a class="btn btn-primary" href="{url 'user/edit' array('uid' => $uid)}">编辑当前用户资料</a>
			</div>
		</div>
	</div>
</div>
{template 'common/footer-gw'}
